# ifndef __Selection_H_
# define __Selection_H_

# include "Map.h"

typedef std::vector<find_info_t> find_info_m_t;
extern find_info_m_t g_Selection;

find_info_t FindRgn (map_t & _map, int _x, int _y, const rgn_t * _pExceptRgn = NULL);
find_info_t FindRgn (int _x, int _y, const rgn_t * _pExceptRgn = NULL);
bool StickPointToNodeOrGrid (size_t _cLevelIdx, int & _x, int & _y, point_t & _pointStick, const rgn_t * pExceptRgn = NULL);

// Return true if point is inside selection.
bool SelectObjectAt (int _x, int _y, bool _bAdd, bool _bElementOnly, bool _bEnableRedraw = true);
void SelectObjectsInsideRect (const rect_t & _rectSelection, bool _bAdd, bool _bElementOnly);
void SelectObjectsInsidePolygon (const rgn_t & _rgn, bool _bAdd);
void SelectAllObjects (bool _bObjects, bool _bTracks, bool _bWaypoints, bool _bRoutes, bool _bRasters);
void UnselectObjects ();
void InvertSelection ();
bool IsInvertSelectionDisabled ();

void DrawSelection (HDC _hDC);

void SetSelectionOffset (int _iXOffset, int _iYOffset);

# endif // __Selection_H_